let api = `${baseApi}roomManagement`;

/**
 * @method addRoom 添加房间
 * @param 房间对象
 * @return axios
 */
export const addRoom = function (params){
	return axios.post(`${api}/addRoom`,params)
}

/**
 * @method deleteRoom 删除房间
 * @param Id
 * @return axios
 */
export const deleteRoom = function (params){
	return axios.delete(`${api}/deleteRoom/`+params)
}

/**
 * @method getRooms 查询所有房间
 * @param {page,pageSize}
 * @return axios
 */
export const getRooms = function (params){
	return axios.post(`${api}/getListByPage`,params)
}

/**
 * @method queryRoomManagement 带条件查询所有房间
 * @param {page,pageSize}
 * @return axios
 */
export const queryRoomManagement = function (params){
	return axios.post(`${api}/queryRoomManagement`,params)
}


/**
 * @method getRoomById 查询所有房间据Id
 * @param Id
 * @return axios
 */
export const getRoomById = function (params){
	return axios.get(`${api}/getRoomById/`+params)
}

/**
 * @method updateRoom 修改房间
 * @param 表单数据
 * @return axios
 */
export const updateRoom = function (params){
	return axios.put(`${api}/updateRoom`,params)
}

/**
 * @method updateByRent 修改出租信息
 * @param {page,pageSize}
 * @return axios
 */
export const updateByRent = function (params){
	return axios.put(`${api}/updateByRent`,params)
}

/**
 * @method addDeviceChange 添加换表
 * @param 换表对象
 * @return axios
 */
export const addDeviceChange = function (params){
	return axios.post(`${api}/addDeviceChange`,params)
}

/**
 * @method getDeviceChangesByRoomId 查询所有房间据Id
 * @param Id
 * @return axios
 */
export const getDeviceChangesByRoomId_CurrentMonth = function (pkRoomId,bCurrentMonth){

	return axios.get(`${api}/getDeviceChangesByRoomId_CurrentMonth/${pkRoomId}/${bCurrentMonth}`)
}